<template>
  <div class="dad">
    父组件
    <Suspense>
      <template v-slot:default>
        <son/>
      </template>
      <template v-slot:fallback>
        <h4>Loading...</h4>
      </template>
    </Suspense>
  </div>
</template>

<script>
// import Son from './components/Son.vue';  //静态引入
import { defineAsyncComponent } from 'vue';
const Son = defineAsyncComponent(()=>import('./components/Son.vue'))  //异步引入

export default {
  name:'App',
  components:{Son},
}
</script>

<style>
  .dad{
    padding:40px;
    background-color: red;
  }
</style>